<?php

// +------------------------------------------------------------------------+
// | AuthPuppy Authentication Server                                        |
// | ===============================                                        |
// |                                                                        |
// | AuthPuppy is the new generation of authentication server for           |
// | a wifidog based captive portal suite                                   |
// +------------------------------------------------------------------------+
// | PHP version 5 required.                                                |
// +------------------------------------------------------------------------+
// | Homepage:     http://www.authpuppy.org/                                |
// | Launchpad:    http://www.launchpad.net/authpuppy                       |
// +------------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or modify   |
// | it under the terms of the GNU General Public License as published by   |
// | the Free Software Foundation; either version 2 of the License, or      |
// | (at your option) any later version.                                    |
// |                                                                        |
// | This program is distributed in the hope that it will be useful,        |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of         |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          |
// | GNU General Public License for more details.                           |
// |                                                                        |
// | You should have received a copy of the GNU General Public License along|
// | with this program; if not, write to the Free Software Foundation, Inc.,|
// | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.            |
// +------------------------------------------------------------------------+


/**
 * This class has been auto-generated by the Doctrine ORM Framework
 */
class Addconnections extends Doctrine_Migration_Base
{
    public function up()
    {
        $this->createTable('connections', array(
             'id' => 
             array(
              'type' => 'integer',
              'length' => 8,
              'autoincrement' => true,
              'primary' => true,
             ),
             'node_id' => 
             array(
              'type' => 'integer',
              'notnull' => true,
              'length' => 8,
             ),
             'token' => 
             array(
              'type' => 'string',
              'unique' => true,
              'notnull' => true,
              'length' => 255,
             ),
             'status' => 
             array(
              'type' => 'string',
              'notnull' => true,
              'length' => 255,
             ),
             'mac' => 
             array(
              'type' => 'string',
              'length' => 255,
             ),
             'ip' => 
             array(
              'type' => 'string',
              'length' => 255,
             ),
             'auth_type' => 
             array(
              'type' => 'string',
              'length' => 255,
             ),
             'identity' => 
             array(
              'type' => 'string',
              'length' => 255,
             ),
             'incoming' => 
             array(
              'type' => 'integer',
              'default' => 0,
              'length' => 8,
             ),
             'outgoing' => 
             array(
              'type' => 'integer',
              'default' => 0,
              'length' => 8,
             ),
             'created_at' => 
             array(
              'notnull' => true,
              'type' => 'timestamp',
              'length' => 25,
             ),
             'updated_at' => 
             array(
              'notnull' => true,
              'type' => 'timestamp',
              'length' => 25,
             ),
             ), array(
             'indexes' => 
             array(
             ),
             'primary' => 
             array(
              0 => 'id',
             ),
             ));
    }

    public function down()
    {
        $this->dropTable('connections');
    }
}